<template>
    <el-dialog
            title="提示"
            :visible.sync="dialogVisible"
            width="80%"
            >
        <h3>First : {{first.stockInDateStr}}</h3>
        <h3>Last : {{last.stockInDateStr}}</h3>
        <el-table
                :data="stockInfoList"
                border
                stripe
                style="width: 100%">
            <el-table-column
                    prop="shipInformation"
                    label="Ship Info"
                  >
            </el-table-column>
            <el-table-column
                    prop="sendGoodsContract"
                    label="Delivery Contract"
                    >
            </el-table-column>
            <el-table-column
                    prop="packingOrderNumber"
                    label="Package List">
            </el-table-column>
            <el-table-column
                    prop="stockOrNot"
                    label="Status">
            </el-table-column>
        </el-table>
        <template slot="footer">
            <el-button @click="dialogVisible = false" type="primary" >Close</el-button>
        </template>
    </el-dialog>
</template>

<script>
    export default {
        name: "stock-info-dialog",
        data() {
            return {
                dialogVisible: false
            }
        },
        props:{
            stockInfoList:{
                type:Array,
                default:() => []
            },
            first:{
                type: Object,
                default: ()=>{}
            },
            last:{
                type: Object,
                default: ()=>{}
            }
        },
        methods: {
            open() {
              this.$nextTick(()=>{
                  if(this.stockInfoList.length) {
                      this.dialogVisible = true
                  } else {
                      this.$message.error('No Data Found')
                  }
              })
            },
            close(){
                this.dialogVisible = false
            }
        },
    }
</script>

<style scoped>

</style>